package com.java1234.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
* 用户表
* </p>
*
* @author Administrator
* @since 2025-05-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("users")
public class UsersEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
    * 主键
    */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
    * 用户名
    */
    @TableField("username")
    private String username;

    /**
    * 密码
    */
    @TableField("password")
    private String password;

    /**
    * 角色
    */
    @TableField("role")
    private String role;

    /**
    * 新增时间
    */
    @TableField("addtime")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date addtime;


}